home *** CD-ROM | disk | FTP | other *** search
/ What CD? 12 / What PC June 1997.iso / multi / cyber / cyber95 / _setup.1 / RIBHORN1.POP < prev    next >
Encoding:
Text File  |  1996-09-02  |  3.9 KB  |  142 lines

  1. // file : ribHorn1.pop
  2. // the ribHorn form has the same top level structure as a normal horn form,
  3. // but it's ribs are made up of reflected sub-horns
  4.  
  5.  
  6. /////////////////////////////////
  7. // population display settings //
  8. /////////////////////////////////
  9.  
  10. population 0
  11. dimensions = 1
  12. colour_model RGB
  13. render_quality flat
  14.  
  15.  
  16. ////////////
  17. // genome //
  18. ////////////
  19.  
  20. genome 0 {
  21.  
  22.     ////////////////
  23.     // initialise //
  24.     ////////////////
  25.  
  26.     // initialise scaling
  27.     eggScale( 1 : 0.5 : 1 ),   // allow smaller primitives than standard
  28.  
  29.     // initialise material properties
  30.     setColour( hsv<.5,.5,.75> : hsv<0,.2,.5> : hsv<.99999,.99999,.99999> ),
  31.     setTexture( norder false:toggle ),
  32.     setBitmap( norder 0 : 0 : 20 ),
  33.     *setWrap( norder 0 : 0 : 2 ),
  34.  
  35.     ///////////////
  36.     // horn loop //
  37.     ///////////////
  38.  
  39.     repeat( 1 : 1 : 40,   // #horn-segments
  40.         
  41.         // horn-segment code is made up of 2 distinct code blocks; the first block is executed
  42.         // within a new scope, called the "segment rib"; the second block is executed within
  43.         // the current scope and is called the "segment spine"
  44.         join(
  45.  
  46.             /////////
  47.             // rib //
  48.             /////////
  49.             
  50.             scope(
  51.                 // rotate so that rib does not point in same direction as the spine
  52.                 rotate( <0,1.570796,0> : <0,-2,0> : <0,2,0> ),
  53.                 // move away from spine slightly
  54.                 forward( 0 : -3 : 3 ),
  55.                 // re-shape primitive
  56.                 eggVectorScale( <1,1,1> : <.75,.75,.75> : <1.25,1.25,1.25> ),
  57.                 // determine primitive type
  58.                 egg( 0 : 0 : 10 ),
  59.                 
  60.                 // lay an (enlarged) egg, (ie. visual for this spine segment)
  61.                 *scope(
  62.                     eggVectorScale( <1.5,1.5,1.5> : <1,1,1> : <10,10,10>),
  63.                     egg( 2 : 0 : 10 ),
  64.                     lay
  65.                 ),
  66.  
  67.                 // in this form the rib visually consists of a reflected sub-horn
  68.                 reflect( <1,1,-1> : <-1,-1,-1> : <1,1,1>,  
  69.                     ///////////////////////////
  70.                     // rib visual : sub horn //
  71.                     ///////////////////////////
  72.                     join(
  73.  
  74.                         // initialise material properties
  75.                         setColour( hsv<.5,.5,.75> : hsv<0,.2,.5> : hsv<.99999,.99999,.99999> ),
  76.                         setTexture( norder false:toggle ),
  77.                         setBitmap( norder 0 : 0 : 20 ),
  78.                         *setWrap( norder 0 : 0 : 2 ),
  79.  
  80.                         ///////////////
  81.                         // horn loop //
  82.                         ///////////////
  83.  
  84.                         repeat( 1 : 1 : 40,   // #sub-horn-segments
  85.                             
  86.                             // horn-segment code is made up of 2 distinct code blocks; the first block is executed
  87.                             // within a new scope, called the "segment rib"; the second block is executed within
  88.                             // the current scope and is called the "segment spine"
  89.                             join(
  90.  
  91.                                 /////////////
  92.                                 // sub-rib //
  93.                                 /////////////
  94.  
  95.                                 // in this horn the rib visually consists of a single primtive
  96.                                 scope(
  97.                                     // rotate so that rib does not point in same direction as the spine
  98.                                     rotate( <0,0,0> : <-2,-2,-2> : <2,2,2> ),
  99.                                     // move away from spine slightly
  100.                                     forward( 0 : -2 : 2 ),
  101.                                     // re-shape primitive
  102.                                     eggVectorScale( <1,1,1> : <.75,.75,.75> : <1.25,1.25,1.25> ),
  103.                                     // determine primitive type and lay an egg
  104.                                     egg( 0 : 0 : 10 ),
  105.                                     lay
  106.                                 ),
  107.  
  108.                                 ///////////////
  109.                                 // sub-spine //
  110.                                 ///////////////
  111.  
  112.                                 // updates the turtle state ready for the next segment
  113.                                 move( <.5,0,0> : <-1,-1,-1> : <1,1,1> ),
  114.                                 scale( 1.05 : 1.01 : 1.1 ),
  115.                                 bankLeft( dtor(10 : -25 : 25) ),
  116.                                 noseUp( dtor(10 : -25 : 25) ),
  117.                                 moveHue( 0.01 : 0.005 : 0.05 ),
  118.                                 scale( 1 : 0.9 : 1.1 )
  119.                             )
  120.                         )  // end sub-horn repeat loop
  121.                     )  // end reflected-join block
  122.                 )  // end reflect
  123.             ), // end rib-scope
  124.  
  125.             ///////////
  126.             // spine //
  127.             ///////////
  128.  
  129.             // updates the turtle state ready for the next segment
  130.             forward( 1 : -1 : 1 ),
  131.             scale( 1.05 : 1.01 : 1.1 ),
  132.             noseUp( dtor(10 : -25 : 25) ),
  133.             moveHue( 0.01 : 0.005 : 0.05 ),
  134.             scale( 1 : 0.9 : 1.1 )
  135.         )
  136.     )
  137. }
  138.  
  139.  
  140. // eof : ribHorn1.pop
  141.  
  142.